import { GlobalData } from '/store/state'
import { $event } from '/utils'

Component({
  data: {
    show: false,
    name: '{{NAME}}',
  },

  pageLifetimes: {
    show() {
      $event.on('download', this, () => {
        if (!GlobalData.access.download) return
        this.setData({
          show: true,
        })
      })
    },
  },

  methods: {
    emptyHandler() {},
    onClose() {
      this.setData({
        show: false,
      })
    },
  },
})
